package com.example.twoservice.service.impl;

import com.example.twoservice.domain.Product;
import com.example.twoservice.mapper.ProductMapper;
import com.example.twoservice.service.ProductService;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author LXG
 * @since 2021-06-07
 */
@Service
public class ProductServiceImpl extends ServiceImpl<ProductMapper, Product> implements ProductService {

    @Autowired
    private ProductMapper productMapper;


    @Override
    @Transactional
    public void addProduct(Product product) {
        productMapper.insert(product);
    }
}
